#ifdef SWIGPYTHON
%{
PyObject *py_mod;
%}
%init %{
   py_mod=PyImport_ImportModule("DEF");
%}
#else
#define L_OUTPUT OUTPUT
#endif
#ifdef SWIGTCL
%{
Tcl_Obj *
SWIG_Ptr2Obj(Tcl_Interp *interp,const char *classstr,
             struct swig_type_info *swig_type,void *source);

%}
#endif
class defiAlias_itr {
public:
  defiAlias_itr();
  void Init();

  void Destroy();
  ~defiAlias_itr();

  int Next();
  const char* Key();
  const char* Data();
  int Marked();

};
class defiAssertion {
public:
  defiAssertion();
  void Init();

  void Destroy();
  ~defiAssertion();

  void setConstraintMode();
  void setAssertionMode();
  void setSum();
  void setDiff();
  void setNetName(const char* name);
  void setRiseMin(double num);
  void setRiseMax(double num);
  void setFallMin(double num);
  void setFallMax(double num);
  void setDelay();
  void setWiredlogicMode();
  void setWiredlogic(const char* net, double dist);
  void addNet(const char* name);
  void addPath(const char* fromInst, const char* fromPin,
               const char* toInst, const char* toPin);
  void bumpItems();
  void unsetSum();

  int isAssertion() const;  // Either isAssertion or isConstraint is true
  int isConstraint() const;
  int isWiredlogic() const; // Either isWiredlogic or isDelay is true
  int isDelay() const;
  int isSum() const;
  int isDiff() const;
  int hasRiseMin() const;
  int hasRiseMax() const;
  int hasFallMin() const;
  int hasFallMax() const;
  double riseMin() const;
  double riseMax() const;
  double fallMin() const;
  double fallMax() const;
  const char* netName() const; // Wired logic net name
  double distance() const; // Wired logic distance
  int numItems() const;  // number of paths or nets 
  int isPath(int index) const;   // is item #index a path?
  int isNet(int index) const;    // is item #index a net?
  void path(int index, char** L_OUTPUT, char** L_OUTPUT,
	   char** L_OUTPUT, char** L_OUTPUT) const; // Get path data for item #index
  void net(int index, char** L_OUTPUT) const;   // Get net data for item #index

  void clear();
  void print(FILE* f) const;


};
class defiBlockage {
public:
  defiBlockage();
  void Init();

  void Destroy();
  ~defiBlockage();

  void clear();
  void clearPoly();

  void setLayer(const char* name);
  void setPlacement();
  void setComponent(const char* name);
  void setSlots();
  void setFills();
  void setPushdown();
  void setExceptpgnet();                            // 5.7
  void setSoft();                                   // 5.7
  void setPartial(double maxDensity);               // 5.7
  void setSpacing(int minSpacing);
  void setDesignRuleWidth(int width);
  void addRect(int xl, int yl, int xh, int yh);
  void addPolygon(defiGeometries* geom);

  int hasLayer() const;
  int hasPlacement() const;
  int hasComponent() const;
  int hasSlots() const;
  int hasFills() const;
  int hasPushdown() const;
  int hasExceptpgnet() const;                       // 5.7
  int hasSoft() const;                              // 5.7
  int hasPartial() const;                           // 5.7
  int hasSpacing() const;                           // 5.6
  int hasDesignRuleWidth() const;                   // 5.6
  int minSpacing() const;                           // 5.6
  int designRuleWidth() const;                      // 5.6
  double placementMaxDensity() const;               // 5.7
  const char* layerName() const;
  const char* layerComponentName() const;
  const char* placementComponentName() const;

  int numRectangles() const;
  int xl(int index) const;
  int yl(int index) const;
  int xh(int index) const;
  int yh(int index) const;

  int numPolygons() const;                          // 5.6
  struct defiPoints getPolygon(int index) const;    // 5.6

  void print(FILE* f) const;

};
class defiComponent {
public:
  defiComponent();
  void Init();

  void Destroy();
  ~defiComponent();

  void IdAndName(const char* id, const char* name);
  void setGenerate(const char* genName, const char* macroName);
  void setPlacementStatus(int n);
  void setPlacementLocation(int x, int y, int orient);
  void setRegionName(const char* name);
  void setRegionBounds(int xl, int yl, int xh, int yh);
  void setEEQ(const char* name);
  void addNet(const char* netName);
  void addProperty(const char* name, const char* value, const char type);
  void addNumProperty(const char* name, const double d,
                      const char* value, const char type);
  void reverseNetOrder();
  void setWeight(int w);
  void setSource(const char* name);
  void setForeignName(const char* name);
  void setFori(const char* name);
  void setForeignLocation(int x, int y, int orient);
  void setHalo(int left, int bottom, int right, int top);   // 5.6
  void setHaloSoft();                                       // 5.7
  void setRouteHalo(int haloDist, const char* minLayer, const char* maxLayer);
                                                            // 5.7
  void clear();

  // For OA to modify the Id & Name
  void changeIdAndName(const char* id, const char* name);

  const char* id() const;
  const char* name() const;
  int placementStatus() const;
  int isUnplaced() const;
  int isPlaced() const;
  int isFixed() const;
  int isCover() const;
  int placementX() const;
  int placementY() const;
  int placementOrient() const;
  const char* placementOrientStr() const;
  int hasRegionName() const;
  int hasRegionBounds() const;
  int hasEEQ() const;
  int hasGenerate() const;
  int hasSource() const;
  int hasWeight() const;
  int weight() const;
  int hasNets() const;
  int numNets() const;
  const char* net(int index) const;
  const char* regionName() const;
  const char* source() const;
  const char* EEQ() const;
  const char* generateName() const;
  const char* macroName() const;
  int hasHalo() const;                     // 5.6
  int hasHaloSoft() const;                 // 5.7
  void haloEdges(int* L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT);  // 5.6 
  int hasRouteHalo() const;                // 5.7
  int haloDist() const;                    // 5.7
  const char* minLayer() const;            // 5.7
  const char* maxLayer() const;            // 5.7

  // Returns arrays for the ll and ur of the rectangles in the region.
  // The number of items in the arrays is given in size.
  void regionBounds(int* L_OUTPUT, int** xl, int** yl, int** xh, int** yh);

  int hasForeignName() const;
  const char* foreignName() const;
  int foreignX() const;
  int foreignY() const;
  const char* foreignOri() const; // return the string value of the orient
  int foreignOrient() const;      // return the enum value of the orient
  int hasFori() const;

  int numProps() const;
  char*  propName(int index) const;
  char*  propValue(int index) const;
  double propNumber(int index) const;
  char   propType(int index) const;
  int    propIsNumber(int index) const;
  int    propIsString(int index) const;

  // Debug printing
  void print(FILE* fout);

  void bumpId(int size);
  void bumpName(int size);
  void bumpRegionName(int size);
  void bumpEEQ(int size);
  void bumpNets(int size);
  void bumpForeignName(int size);
  void bumpMinLayer(int size);
  void bumpMaxLayer(int size);
  void bumpFori(int size);

};
class defiFill {
public:
  defiFill();
  void Init();

  void Destroy();
  ~defiFill();

  void clear();
  void clearPoly();
  void clearPts();

  void setLayer(const char* name);
  void setLayerOpc();                             // 5.7
  void addRect(int xl, int yl, int xh, int yh);
  void addPolygon(defiGeometries* geom);
  void setVia(const char* name);                  // 5.7
  void setViaOpc();                               // 5.7
  void addPts(defiGeometries* geom);              // 5.7

  int hasLayer() const;
  const char* layerName() const;
  int hasLayerOpc() const;                        // 5.7

  int numRectangles() const;
  int xl(int index) const;
  int yl(int index) const;
  int xh(int index) const;
  int yh(int index) const;

  int numPolygons() const;                        // 5.6
  struct defiPoints getPolygon(int index) const;  // 5.6

  int hasVia() const;                             // 5.7
  const char* viaName() const;                    // 5.7
  int hasViaOpc() const;                          // 5.7

  int numViaPts() const;                          // 5.7
  struct defiPoints getViaPts(int index) const;   // 5.7

  void print(FILE* f) const;

};
class defiFPC {
public:
  defiFPC();
  void Init();

  void Destroy();
  ~defiFPC();

  void clear();

  void setName(const char* name, const char* direction);
  void setAlign();
  void setMax(double num);
  void setMin(double num);
  void setEqual(double num);
  void setDoingBottomLeft();
  void setDoingTopRight();
  void addRow(const char* name);
  void addComps(const char* name);
  void addItem(char typ, const char* name);

  const char* name() const;
  int isVertical() const;
  int isHorizontal() const;
  int hasAlign() const;
  int hasMax() const;
  int hasMin() const;
  int hasEqual() const;
  double alignMax() const;
  double alignMin() const;
  double equal() const;

  int numParts() const;

  // Return the constraint number "index" where index is
  //    from 0 to numParts()
  // The returned corner is 'B' for bottom left  'T' for topright
  // The returned typ is 'R' for rows   'C' for comps
  // The returned char* points to name of the item.
  void getPart(int index, int* L_OUTPUT, int* L_OUTPUT, char** L_OUTPUT) const;

  // debug print
  void print(FILE* f) const;

};
class defiGroup {
public:
  defiGroup();
  void Init();

  void Destroy();
  ~defiGroup();

  void clear();

  void setup(const char* name);
  void addProperty(const char* name, const char* value, const char type);
  void addNumProperty(const char* name, const double d,
                      const char* value, const char type);
  void addRegionRect(int xl, int yl, int xh, int yh);
  void setRegionName(const char* name);
  void setMaxX(int x);
  void setMaxY(int y);
  void setPerim(int p);

  const char* name() const;
  const char* regionName() const;
  int hasRegionBox() const;
  int hasRegionName() const;
  int hasMaxX() const;
  int hasMaxY() const;
  int hasPerim() const;
  void regionRects(int* L_OUTPUT, int** xl, int**yl, int** xh, int** yh);
  int maxX() const;
  int maxY() const;
  int perim() const;

  int numProps() const;
  const char*  propName(int index) const;
  const char*  propValue(int index) const;
  double propNumber(int index) const;
  const char   propType(int index) const;
  int    propIsNumber(int index) const;
  int    propIsString(int index) const;

  // debug print
  void print(FILE* f) const;

};
class defiIOTiming {
public:
  defiIOTiming();
  void Init();

  void Destroy();
  ~defiIOTiming();

  void clear();

  void setName(const char* inst, const char* pin);
  void setVariable(const char* riseFall, double min, double max);
  void setSlewRate(const char* riseFall, double min, double max);
  void setCapacitance(double num);
  void setDriveCell(const char* name);
  void setFrom(const char* name);
  void setTo(const char* name);
  void setParallel(double num);


  int hasVariableRise() const;
  int hasVariableFall() const;
  int hasSlewRise() const;
  int hasSlewFall() const;
  int hasCapacitance() const;
  int hasDriveCell() const;
  int hasFrom() const;
  int hasTo() const;
  int hasParallel() const;

  const char* inst() const;
  const char* pin() const;
  double variableFallMin() const;
  double variableRiseMin() const;
  double variableFallMax() const;
  double variableRiseMax() const;
  double slewFallMin() const;
  double slewRiseMin() const;
  double slewFallMax() const;
  double slewRiseMax() const;
  double capacitance() const;
  const char* driveCell() const;
  const char* from() const;
  const char* to() const;
  double parallel() const;

  // debug print
  void print(FILE* f) const;

};
class defiGeometries {
public:
  defiGeometries();
  void Init();
  void Reset();

  void Destroy();
  ~defiGeometries();

  void startList(int x, int y);
  void addToList(int x, int y);
  int  numPoints();
  void points(int index, int* L_OUTPUT, int* L_OUTPUT);

};
class defiStyles {
public:
  defiStyles();
  void Init();

  void Destroy();
  ~defiStyles();

  void clear();

  void setStyle(int styleNum);
  void setPolygon(defiGeometries* geom);

  int style() const;
  struct defiPoints getPolygon() const;

};
class defiWire {
public:
  defiWire();
  ~defiWire();

  void Init(const char* type, const char* wireShieldName);
  void Destroy();
  void clear();
  void addPath(defiPath *p, int reset, int netOsnet, int* L_OUTPUT);

  const char* wireType() const;
  const char* wireShieldNetName() const;
  int         numPaths() const;
  defiPath*   path(int index);

  void bumpPaths(int size);

};
class defiSubnet {
public:
  defiSubnet();
  void Init();

  void Destroy();
  ~defiSubnet();

  void setName(const char* name);
  void setNonDefault(const char* name);
  void addPin(const char* instance, const char* pin, int syn);
  void addMustPin(const char* instance, const char* pin, int syn);

  // WMD -- the following will be removed by the next release
  void setType(const char* typ);  // Either FIXED COVER ROUTED
  void addPath(defiPath* p, int reset, int netOsnet, int* L_OUTPUT);

  // NEW: a net can have more than 1 wire
  void addWire(const char *typ); 
  void addWirePath(defiPath *p, int reset, int netOsnet, int* L_OUTPUT);

  // Debug printing
  void print(FILE* f);

  const char* name() const;
  int numConnections();
  const char* instance(int index);
  const char* pin(int index);
  int pinIsSynthesized(int index);
  int pinIsMustJoin(int index);

  // WMD -- the following will be removed by the next release
  int isFixed() const;
  int isRouted() const;
  int isCover() const;

  int hasNonDefaultRule() const;
//  int hasShield() const;        // will be removed after 5.6
//  int hasShieldNet() const;     // will be removed after 5.6
//  int hasNoShieldNet() const;   // this is a pre 5.4 routine, remove after 5.6

  // WMD -- the following will be removed by the next release
  int numPaths() const;
  defiPath* path(int index);

  const char* nonDefaultRule() const;

  int         numWires() const;
  defiWire*   wire(int index);

  void bumpName(int size);
  void bumpPins(int size);
  void bumpPaths(int size);
  void clear();

};
class defiVpin {
public:
  defiVpin();
  ~defiVpin();

  void Init(const char* name);
  void Destroy();
  void setLayer(const char* name);
  void setBounds(int xl, int yl, int xh, int yh);
  void setOrient(int orient);
  void setLoc(int x, int y);
  void setStatus(char st);

  int xl() const ;
  int yl() const ;
  int xh() const ;
  int yh() const ;
  char status() const;      /* P-placed, F-fixed, C-cover, ' ' - not set */
  int orient() const ;
  const char* orientStr() const ;
  int xLoc() const;
  int yLoc() const;
  const char* name() const;
  const char* layer() const;

};
class defiShield {
public:
  defiShield();
  ~defiShield();

  void Init(const char* name);
  void Destroy();
  void clear();
  void addPath(defiPath *p, int reset, int netOsnet, int* L_OUTPUT);

  const char* shieldName() const;
  int         numPaths() const;
  defiPath*   path(int index);

  void bumpPaths(int size);

};
class defiNet {
public:
  defiNet();
  void Init();

  void Destroy();
  ~defiNet();

  // Routines used by YACC to set the fields in the net.
  void setName(const char* name);
  void addPin(const char* instance, const char* pin, int syn);
  void addMustPin(const char* instance, const char* pin, int syn);
  void setWeight(int w);

  // WMD -- the following will be removed by the next release
  void setType(const char* typ);  // Either FIXED COVER ROUTED

  void addProp(const char* name, const char* value, const char type);
  void addNumProp(const char* name, const double d,
                  const char* value, const char type);
  void addSubnet(defiSubnet* subnet);
  // NEW: a net can have more than 1 wire
  void addWire(const char *typ, const char* wireShieldName);
  void addWirePath(defiPath* p, int reset, int netOsnet, int* L_OUTPUT);
  void setSource(const char* typ);
  void setFixedbump();                          // 5.4.1
  void setFrequency(double frequency);          // 5.4.1
  void setOriginal(const char* typ);
  void setPattern(const char* typ);
  void setCap(double w);
  void setUse(const char* typ);
  void setNonDefaultRule(const char* typ);
  void setStyle(int style);
  void addShield(const char* shieldNetName);    // pre 5.4
  void addNoShield(const char* shieldNetName);  // pre 5.4
  void addShieldNet(const char* shieldNetName);

  void addShieldPath(defiPath* p, int reset, int netOsnet, int* L_OUTPUT);
  void clear();
  void setWidth(const char* layer, double dist);
  void setSpacing(const char* layer, double dist);
  void setVoltage(double num);
  void setRange(double left, double right);
  void setXTalk(int num);
  void addVpin(const char* name);
  void addVpinLayer(const char* name);
  void addVpinLoc(const char* status, int x, int y, int orient);
  void addVpinBounds(int xl, int yl, int xh, int yh);
  // 5.6
  void addPolygon(const char* layerName, defiGeometries* geom, int* L_OUTPUT);
  void addRect(const char* layerName, int xl, int yl, int xh, int yh,
               int* L_OUTPUT); // 5.6

  // For OA to modify the netName, id & pinName
  void changeNetName(const char* name);
  void changeInstance(const char* name, int index);
  void changePin(const char* name, int index);

  // Routines to return the value of net data.
  const char*  name() const;
  int          weight() const;
  int          numProps() const;
  const char*  propName(int index) const;
  const char*  propValue(int index) const;
  double propNumber(int index) const;
  const char   propType(int index) const;
  int    propIsNumber(int index) const;
  int    propIsString(int index) const;
  int          numConnections() const;
  const char*  instance(int index) const;
  const char*  pin(int index) const;
  int          pinIsMustJoin(int index) const;
  int          pinIsSynthesized(int index) const;
  int          numSubnets() const;
  defiSubnet*  subnet(int index);

  // WMD -- the following will be removed by the next release
  int         isFixed() const;
  int         isRouted() const;
  int         isCover() const;

  /* The following routines are for wiring */
  int         numWires() const;
  defiWire*   wire(int index);

  /* Routines to get the information about Virtual Pins. */
  int       numVpins() const;
  defiVpin* vpin(int index) const;

  int hasProps() const;
  int hasWeight() const;
  int hasSubnets() const;
  int hasSource() const;
  int hasFixedbump() const;                          // 5.4.1
  int hasFrequency() const;                          // 5.4.1
  int hasPattern() const;
  int hasOriginal() const;
  int hasCap() const;
  int hasUse() const;
  int hasStyle() const;
  int hasNonDefaultRule() const;
  int hasVoltage() const;
  int hasSpacingRules() const;
  int hasWidthRules() const;
  int hasXTalk() const;

  int numSpacingRules() const;
  void spacingRule(int index, char** L_OUTPUT, double* dist, double* left,
                   double* right);
  int numWidthRules() const;
  void widthRule(int index, char** L_OUTPUT, double* dist);
  double voltage() const;

  int            XTalk() const;
  const char*    source() const;
  double         frequency() const;
  const char*    original() const;
  const char*    pattern() const;
  double         cap() const;
  const char*    use() const;
  int            style() const;
  const char*    nonDefaultRule() const;

  // WMD -- the following will be removed by the next release
  int            numPaths() const;
  defiPath*      path(int index);

  int            numShields() const;          // pre 5.4
  defiShield*    shield(int index);           // pre 5.4
  int            numShieldNets() const;
  const char*    shieldNet(int index) const;
  int            numNoShields() const;        // pre 5.4
  defiShield*    noShield(int index);         // pre 5.4

  // 5.6
  int  numPolygons() const;                           // 5.6
  const  char* polygonName(int index) const;          // 5.6
  struct defiPoints getPolygon(int index) const;      // 5.6
  int  numRectangles() const;                         // 5.6
  const  char* rectName(int index) const;             // 5.6
  int  xl(int index)const;                            // 5.6
  int  yl(int index)const;                            // 5.6
  int  xh(int index)const;                            // 5.6
  int  yh(int index)const;                            // 5.6
  
  // Debug printing
  void print(FILE* f);


  void bumpName(int size);
  void bumpPins(int size);
  void bumpProps(int size);
  void bumpSubnets(int size);
  void bumpPaths(int size);
  void bumpShieldNets(int size);

  // The method freeWire() is added is user select to have a callback
  // per wire within a net This is an internal method and is not public
  void freeWire();
  void freeShield();

  // Clear the rectangles & polygons data if partial path callback is set
  void clearRectPolyNPath();

};
class defiNonDefault {
public:
  defiNonDefault();
  void Init();

  void Destroy();
  ~defiNonDefault();

  void clear();
  void setName(const char* name);
  void setHardspacing();
  void addLayer(const char* name);
  void addWidth(double num);
  void addDiagWidth(double num);
  void addSpacing(double num);
  void addWireExt(double num);
  void addVia(const char* name);
  void addViaRule(const char* name);
  void addMinCuts(const char* name, int numCuts);
  void addProperty(const char* name, const char* value, const char type);
  void addNumProperty(const char* name, const double d,
                      const char* value, const char type);
  void end();

  const char* name() const;
  int   hasHardspacing() const;

  int         numProps() const;
  const char* propName(int index) const;
  const char* propValue(int index) const;
  double      propNumber(int index) const;
  const char  propType(int index) const;
  int         propIsNumber(int index) const;
  int         propIsString(int index) const;
  
  // A non default rule can have one or more layers.
  // The layer information is kept in an array.
  int         numLayers() const ;
  const char* layerName(int index) const ;
  double      layerWidth(int index) const ;       // Will be obsoleted in 5.7
  int         layerWidthVal(int index) const ;
  int         hasLayerDiagWidth(int index) const;
  double      layerDiagWidth(int index) const;    // Will be obsoleted in 5.7
  int         layerDiagWidthVal(int index) const;
  int         hasLayerSpacing(int index) const ;
  double      layerSpacing(int index) const ;     // Will be obsoleted in 5.7
  int         layerSpacingVal(int index) const ;
  int         hasLayerWireExt(int index) const ;
  double      layerWireExt(int index) const ;     // Will be obsoleted in 5.7
  int         layerWireExtVal(int index) const ;
  int         numVias() const ;
  const char* viaName(int index) const ;
  int         numViaRules() const ;
  const char* viaRuleName(int index) const ;
  int         numMinCuts() const;
  const char* cutLayerName(int index) const;
  int         numCuts(int index) const;

  // Debug print
  void print(FILE* f);

};
class defiPartition {
public:
  defiPartition();
  void Init();

  void Destroy();
  ~defiPartition();

  void clear();

  void setName(const char* name);
  void addTurnOff(const char* setup, const char* hold);
  void setFromClockPin(const char* inst, const char* pin);
  void setFromCompPin(const char* inst, const char* pin);
  void setFromIOPin(const char* inst);
  void setToClockPin(const char* inst, const char* pin);
  void setToCompPin(const char* inst, const char* pin);
  void set(char dir, char typ, const char* inst, const char* pin);
  void setToIOPin(const char* inst);
  void setMin(double min, double max);
  void setMax(double min, double max);
  void addPin(const char* name);
  void addRiseMin(double d);
  void addRiseMax(double d);
  void addFallMin(double d);
  void addFallMax(double d);
  void addRiseMinRange(double l, double h);
  void addRiseMaxRange(double l, double h);
  void addFallMinRange(double l, double h);
  void addFallMaxRange(double l, double h);

  const char* name() const;
  char direction() const;
  const char* itemType() const;  // "CLOCK" or "IO" or "COMP"
  const char* pinName() const;
  const char* instName() const;

  int numPins() const;
  const char* pin(int index) const;

  int isSetupRise() const;
  int isSetupFall() const;
  int isHoldRise() const;
  int isHoldFall() const;
  int hasMin() const;
  int hasMax() const;
  int hasRiseMin() const;
  int hasFallMin() const;
  int hasRiseMax() const;
  int hasFallMax() const;
  int hasRiseMinRange() const;
  int hasFallMinRange() const;
  int hasRiseMaxRange() const;
  int hasFallMaxRange() const;

  double partitionMin() const;
  double partitionMax() const;

  double riseMin() const;
  double fallMin() const;
  double riseMax() const;
  double fallMax() const;

  double riseMinLeft() const;
  double fallMinLeft() const;
  double riseMaxLeft() const;
  double fallMaxLeft() const;
  double riseMinRight() const;
  double fallMinRight() const;
  double riseMaxRight() const;
  double fallMaxRight() const;

  // debug print
  void print(FILE* f) const;

};
class defiPath {
public:
  defiPath();
  void Init();

  void Destroy();
  ~defiPath();

  void clear();
  void reverseOrder();

  // To traverse the path and get the parts.
  void initTraverse();   // Initialize the traverse.
  void initTraverseBackwards();   // Initialize the traverse in reverse.
  int next();            // Get the next element.
  int prev();            // Get the next element in reverse.
  const char* getLayer();// Get the layer.
  const char* getTaperRule();// Get the rule.
  const char* getVia();  // Get the via.
  const char* getShape();// Get the shape.
  int  getStyle();// Get the style.
  int  getViaRotation();  // Get the via rotation.
  const char* getViaRotationStr();   // Return via rotation in string format
  void getViaData(int* L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT);  // 5.4.1
  int  getWidth();        // Get the width.
  void getPoint(int* L_OUTPUT, int* L_OUTPUT);// Get the point.
  void getFlushPoint(int* L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT);// Get the point.

  // These routines are called by the parser to fill the path.
  void addWidth(int w);
  void addPoint(int x, int y);
  void addFlushPoint(int x, int y, int ext);
  void addLayer(const char* layer);
  void addVia(const char* name);
  void addViaRotation(int orient);
  void addViaData(int numX, int numY, int stepX, int stepY);   // 5.4.1
  void setTaper();
  void addTaperRule(const char* rule);
  void addShape(const char* shape);
  void addStyle(int style);

  // debug printing
  void print(FILE* fout);

  void bumpSize(int size);

};
class defiPinCap {
public:

  void setPin(int p);
  void setCap(double d);

  int pin() const;
  double cap() const;

  void print(FILE* f) const;

};
class defiPinAntennaModel {
public:
  defiPinAntennaModel();
  void Init();

  ~defiPinAntennaModel();
  void clear();
  void Destroy();

  void setAntennaModel(int oxide);
  void addAPinGateArea(int value, const char* layer);
  void addAPinMaxAreaCar(int value, const char* layer);
  void addAPinMaxSideAreaCar(int value, const char* layer);
  void addAPinMaxCutCar(int value, const char* layer);

  char* antennaOxide() const;

  int hasAPinGateArea() const;               // ANTENNAPINGATEAREA
  int numAPinGateArea() const;
  int APinGateArea(int index) const;
  int hasAPinGateAreaLayer(int index) const;
  const char* APinGateAreaLayer(int index) const;

  int hasAPinMaxAreaCar() const;             // ANTENNAPINMAXAREACAR
  int numAPinMaxAreaCar() const;
  int APinMaxAreaCar(int index) const;
  int hasAPinMaxAreaCarLayer(int index) const;
  const char* APinMaxAreaCarLayer(int index) const;

  int hasAPinMaxSideAreaCar() const;         // ANTENNAPINMAXSIDEAREACAR
  int numAPinMaxSideAreaCar() const;
  int APinMaxSideAreaCar(int index) const;
  int hasAPinMaxSideAreaCarLayer(int index) const;
  const char* APinMaxSideAreaCarLayer(int index) const;

  int hasAPinMaxCutCar() const;              // ANTENNAPINMAXCUTCAR
  int numAPinMaxCutCar() const;
  int APinMaxCutCar(int index) const;
  int hasAPinMaxCutCarLayer(int index) const;
  const char* APinMaxCutCarLayer(int index) const;

};
class defiPinPort {                      // 5.7
public:
  defiPinPort();
  void Init();

  ~defiPinPort();

  void clear();

  void addLayer(const char* layer);
  void addLayerSpacing(int minSpacing);
  void addLayerDesignRuleWidth(int effectiveWidth);
  void addLayerPts(int xl, int yl, int xh, int yh);
  void addPolygon(const char* layerName);
  void addPolySpacing(int minSpacing);
  void addPolyDesignRuleWidth(int effectiveWidth);
  void addPolygonPts(defiGeometries* geom);
  void addVia(const char* via, int viaX, int viaY);
  void setPlacement(int typ, int x, int y, int orient);

  int   numLayer() const;
  const char* layer(int index) const;
  void  bounds(int index, int* L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT) const;
  int   hasLayerSpacing(int index) const;
  int   hasLayerDesignRuleWidth(int index) const;
  int   layerSpacing(int index) const;
  int   layerDesignRuleWidth(int index) const;
  int   numPolygons() const;
  const char* polygonName(int index) const;
  struct defiPoints getPolygon(int index) const;
  int   hasPolygonSpacing(int index) const;
  int   hasPolygonDesignRuleWidth(int index) const;
  int   polygonSpacing(int index) const;
  int   polygonDesignRuleWidth(int index) const;
  int   numVias() const;
  const char* viaName(int index) const;
  int   viaPtX (int index) const;
  int   viaPtY (int index) const;
  int   hasPlacement() const;
  int   isPlaced() const;
  int   isCover() const;
  int   isFixed() const;
  int   placementX() const;
  int   placementY() const;
  int   orient() const;
  const char* orientStr() const;

};
class defiPin {
public:
  defiPin();
  void Init();

  ~defiPin();
  void Destroy();

  void Setup(const char* pinName, const char* netName);
  void setDirection(const char* dir);
  void setUse(const char* use);
  // 5.6 setLayer is changed to addLayer due to multiple LAYER are allowed
  // in 5.6
  void addLayer(const char* layer);
  void addLayerSpacing(int minSpacing);                           // 5.6
  void addLayerDesignRuleWidth(int effectiveWidth);               // 5.6
  void addLayerPts(int xl, int yl, int xh, int yh);
  void addPolygon(const char* layerName);                         // 5.6
  void addPolySpacing(int minSpacing);                            // 5.6
  void addPolyDesignRuleWidth(int effectiveWidth);                // 5.6
  void addPolygonPts(defiGeometries* geom);                       // 5.6
  void setNetExpr(const char* netExpr);                           // 5.6
  void setSupplySens(const char* pinName);                        // 5.6
  void setGroundSens(const char* pinName);                        // 5.6
  void setPlacement(int typ, int x, int y, int orient);
  void setSpecial();
  void addAntennaModel(int oxide);                                // 5.5
  void addAPinPartialMetalArea(int value, const char* layer);
  void addAPinPartialMetalSideArea(int value, const char* layer);
  void addAPinGateArea(int value, const char* layer);
  void addAPinDiffArea(int value, const char* layer);
  void addAPinMaxAreaCar(int value, const char* layer);
  void addAPinMaxSideAreaCar(int value, const char* layer);
  void addAPinPartialCutArea(int value, const char* layer);
  void addAPinMaxCutCar(int value, const char* layer);
  void addVia(const char* via, int viaX, int viaY);               // 5.7
  // 5.7 port statements, which may have LAYER, POLYGON, &| VIA
  void addPort();                                                 // 5.7
  void addPortLayer(const char* layer);                           // 5.7
  void addPortLayerSpacing(int minSpacing);                       // 5.7
  void addPortLayerDesignRuleWidth(int effectiveWidth);           // 5.7
  void addPortLayerPts(int xl, int yl, int xh, int yh);           // 5.7
  void addPortPolygon(const char* layerName);                     // 5.7
  void addPortPolySpacing(int minSpacing);                        // 5.7
  void addPortPolyDesignRuleWidth(int effectiveWidth);            // 5.7
  void addPortPolygonPts(defiGeometries* geom);                   // 5.7
  void addPortVia(const char* via, int viaX, int viaY);           // 5.7
  void setPortPlacement(int typ, int x, int y, int orient);       // 5.7

  void clear();

  void changePinName(const char* pinName);       // For OA to modify the pinName

  const char* pinName() const;
  const char* netName() const;
  // optional parts
  int hasDirection() const;
  int hasUse() const;
  int hasLayer() const;
  int hasPlacement() const;
  int isUnplaced() const;
  int isPlaced() const;
  int isCover() const;
  int isFixed() const;
  int placementX() const;
  int placementY() const;
  const char* direction() const;
  const char* use() const;
  int numLayer() const;
  const char* layer(int index) const;
  void bounds(int index, int* L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT) const;
  int hasLayerSpacing(int index) const;               // 5.6
  int hasLayerDesignRuleWidth(int index) const;       // 5.6
  int layerSpacing(int index) const;                  // 5.6
  int layerDesignRuleWidth(int index) const;          // 5.6
  int  numPolygons() const;                           // 5.6
  const  char* polygonName(int index) const;          // 5.6
  struct defiPoints getPolygon(int index) const;      // 5.6
  int hasPolygonSpacing(int index) const;             // 5.6
  int hasPolygonDesignRuleWidth(int index) const;     // 5.6
  int polygonSpacing(int index) const;                // 5.6
  int polygonDesignRuleWidth(int index) const;        // 5.6
  int  hasNetExpr() const;                            // 5.6
  int  hasSupplySensitivity() const;                  // 5.6
  int  hasGroundSensitivity() const;                  // 5.6
  const char* netExpr() const;                        // 5.6
  const char* supplySensitivity() const;              // 5.6
  const char* groundSensitivity() const;              // 5.6
  int orient() const;
  const char* orientStr() const;
  int hasSpecial() const;
  int numVias() const;                                // 5.7
  const char* viaName(int index) const;               // 5.7
  int viaPtX (int index) const;                       // 5.7
  int viaPtY (int index) const;                       // 5.7

  // 5.4
  int hasAPinPartialMetalArea() const;       // ANTENNAPINPARTIALMETALAREA
  int numAPinPartialMetalArea() const;
  int APinPartialMetalArea(int index) const;
  int hasAPinPartialMetalAreaLayer(int index) const;
  const char* APinPartialMetalAreaLayer(int index) const;

  int hasAPinPartialMetalSideArea() const;   // ANTENNAPINPARTIALMETALSIDEAREA
  int numAPinPartialMetalSideArea() const;
  int APinPartialMetalSideArea(int index) const;
  int hasAPinPartialMetalSideAreaLayer(int index) const;
  const char* APinPartialMetalSideAreaLayer(int index) const;

  int hasAPinDiffArea() const;               // ANTENNAPINDIFFAREA
  int numAPinDiffArea() const;
  int APinDiffArea(int index) const;
  int hasAPinDiffAreaLayer(int index) const;
  const char* APinDiffAreaLayer(int index) const;

  int hasAPinPartialCutArea() const;         // ANTENNAPINPARTIALCUTAREA
  int numAPinPartialCutArea() const;
  int APinPartialCutArea(int index) const;
  int hasAPinPartialCutAreaLayer(int index) const;
  const char* APinPartialCutAreaLayer(int index) const;

  // 5.5
  int numAntennaModel() const;
  defiPinAntennaModel* antennaModel(int index) const;

  // 5.7
  int  hasPort() const;
  int  numPorts() const;
  defiPinPort* pinPort(int index) const;
  void print(FILE* f) const;

};
class defiPinProp {
public:
  defiPinProp();
  void Init();

  ~defiPinProp();
  void Destroy();

  void clear();

  void setName(const char* inst, const char* pin);
  void addProperty(const char* name, const char* value, const char type);
  void addNumProperty(const char* name, const double d,
                      const char* value, const char type);

  int isPin() const;
  const char* instName() const;
  const char* pinName() const;

  int numProps() const;
  const char*  propName(int index) const;
  const char*  propValue(int index) const;
  double propNumber(int index) const;
  const char   propType(int index) const;
  int    propIsNumber(int index) const;
  int    propIsString(int index) const;

  void print(FILE* f) const;

};
class defiProp {
public:
  defiProp();
  void Init();

  void Destroy();
  ~defiProp();

  void setPropType(const char* typ, const char* string);
  void setRange(double left, double right);
  void setNumber(double num);
  void setPropInteger();
  void setPropReal();
  void setPropString();
  void setPropQString(const char* string);
  void setPropNameMapString(const char* string);
  void clear();

  const char* string() const;
  const char* propType() const;
  const char* propName() const;
  char  dataType() const;
       // either I:integer R:real S:string Q:quotedstring N:nameMapString
  int hasNumber() const;
  int hasRange() const;
  int hasString() const;
  int hasNameMapString() const;
  double number() const;
  double left() const;
  double right() const;

  void bumpSize(int size);
  void bumpName(int size);

  void print(FILE* f) const;

};
class defiPropType {
public:
  defiPropType();
  void Init();

  void Destroy();
  ~defiPropType();

  void setPropType(const char* name, const char type);
  void Clear();

  const char propType(char* name) const;
  void bumpProps();

};
class defiRegion {
public:
  defiRegion();
  void Init();

  void Destroy();
  ~defiRegion();

  void clear();
  void setup(const char* name);
  void addRect(int xl, int yl, int xh, int yh);
  void addProperty(const char* name, const char* value, const char type);
  void addNumProperty(const char* name, const double d,
                      const char* value, const char type);
  void setType(const char* type);         // 5.4.1

  const char* name() const;

  int numProps() const;
  const char*  propName(int index) const;
  const char*  propValue(int index) const;
  double propNumber(int index) const;
  const char   propType(int index) const;
  int propIsNumber(int index) const;
  int propIsString(int index) const;

  int hasType() const;                    // 5.4.1
  const char* type() const;               // 5.4.1

  int numRectangles() const;
  int xl(int index) const;
  int yl(int index) const;
  int xh(int index) const;
  int yh(int index) const;

  void print(FILE* f) const;

};
class defiRow{
public:

  defiRow();
  void Init();

  ~defiRow();
  void Destroy();
  void clear();

  void setup(const char* name, const char* macro,
	     double x, double y, int orient);
  void setDo(double x_num, double y_num,
	     double x_step, double y_step);
  void setHasDoStep();
  void addProperty(const char* name, const char* value, const char type);
  void addNumProperty(const char* name, const double d, 
                      const char* value, const char type);

  const char* name() const;
  const char* macro() const;
  double x() const;
  double y() const;
  int orient() const;
  const char* orientStr() const;
  int hasDo() const;               // 5.6, DO is optional
  double xNum() const;
  double yNum() const;
  int hasDoStep() const;           // 5.6, STEP is optional in DO
  double xStep() const;
  double yStep() const;

  int numProps() const;
  const char*  propName(int index) const;
  const char*  propValue(int index) const;
  double propNumber(int index) const;
  const char   propType(int index) const;
  int propIsNumber(int index) const;
  int propIsString(int index) const;

  void print(FILE* f) const;

};
class defiTrack{
public:

  defiTrack();
  void Init();

  ~defiTrack();
  void Destroy();

  void setup(const char* macro);
  void setDo(double x, double x_num, double x_step);
  void addLayer(const char* layer);

  const char* macro() const;
  double x() const;
  double xNum() const;
  double xStep() const;
  int numLayers() const;
  const char* layer(int index) const;

  void print(FILE* f) const;

};
class defiGcellGrid {
public:

  defiGcellGrid();
  void Init();

  ~defiGcellGrid();
  void Destroy();

  void setup(const char* macro, int x, int xNum, double xStep);

  const char* macro() const;
  int x() const;
  int xNum() const;
  double xStep() const;

  void print(FILE* f) const;

};
class defiOrdered {
public:
  void addOrdered(const char* inst);
  void addIn(const char* pin);
  void addOut(const char* pin);
  void setOrderedBits(int bits);        // 5.4.1
  void bump();
  void Init();
  void Destroy();
  void clear();

  int num() const;
  char** inst() const;
  char** in() const;
  char** out() const;
  int* L_OUTPUT() const;                  // 5.4.1

};
class defiScanchain {
public:
  defiScanchain();
  void Init();

  void Destroy();
  ~defiScanchain();

  void setName(const char* name);
  void clear();

  void addOrderedList();
  void addOrderedInst(const char* inst);
  void addOrderedIn(const char* inPin);
  void addOrderedOut(const char* outPin);
  void setOrderedBits(int bits);      // 5.4.1

  void addFloatingInst(const char* inst);
  void addFloatingIn(const char* inPin);
  void addFloatingOut(const char* outPin);
  void setFloatingBits(int bits);     // 5.4.1

  void setStart(const char* inst, const char* pin);
  void setStop(const char* inst, const char* pin);
  void setCommonIn(const char* pin);
  void setCommonOut(const char* pin);
  void setPartition(const char* partName, int maxBits);    // 5.4.1

  const char* name() const;
  int hasStart() const;
  int hasStop() const;
  int hasFloating() const;
  int hasOrdered() const;
  int hasCommonInPin() const;
  int hasCommonOutPin() const;
  int hasPartition() const;           // 5.4.1
  int hasPartitionMaxBits() const;    // 5.4.1

  // If the pin part of these routines were not supplied in the DEF
  // then a NULL pointer will be returned.
  void start(char** L_OUTPUT, char** L_OUTPUT) const;
  void stop(char** L_OUTPUT, char** L_OUTPUT) const;

  // There could be many ORDERED constructs in the DEF.  The data in
  // each ORDERED construct is stored in its own array.  The numOrderedLists()
  // routine tells how many lists there are.
  int numOrderedLists() const;

  // This routine will return an array of instances and
  // an array of in and out pins.
  // The number if things in the arrays is returned in size.
  // The inPin and outPin entry is optional for each instance.
  // If an entry is not given, then that char* is NULL.
  // For example if the second instance has
  // instnam= "FOO" and IN="A", but no OUT given, then inst[1] points
  // to "FOO"  inPin[1] points to "A" and outPin[1] is a NULL pointer.
  void ordered(int index, int* size, char*** inst, char*** inPin,
                                      char*** outPin, int** bits) const;

  // All of the floating constructs in the scan chain are
  // stored in this one array.
  // If the IN or OUT of an entry is not supplied then the array will have
  // a NULL pointer in that place.
  void floating(int* size, char*** inst, char*** inPin, char*** outPin,
                                      int** bits) const;

  const char* commonInPin() const;
  const char* commonOutPin() const;

  const char* partitionName() const;        // 5.4.1
  int partitionMaxBits() const;             // 5.4.1

  void print(FILE* f) const;

};
class defiSite {
public:
  defiSite();
  void Init();

  ~defiSite();
  void Destroy();

  void clear();

  void setName(const char* name);
  void setLocation(double xorg, double yorg);
  void setOrient(int orient);
  void setDo(double x_num, double y_num, double x_step, double y_step);

  double x_num() const;
  double y_num() const;
  double x_step() const;
  double y_step() const;
  double x_orig() const;
  double y_orig() const;
  int orient() const;
  const char* orientStr() const;
  const char* name() const;

  void print(FILE* f) const;

  void bumpName(int size);

};
class defiBox {
public:
  // Use the default destructor and constructor.
  // 5.6 changed to use it own constructor & destructor

  defiBox();
  void Init();
  void Destroy();
  ~defiBox();

  // NOTE: 5.6
  // The following methods are still here for backward compatibility
  // For new reader they should use numPoints & getPoint to get the
  // data.
  int xl() const;
  int yl() const;
  int xh() const;
  int yh() const;

  void addPoint(defiGeometries* geom);
  struct defiPoints getPoint() const;

  void print(FILE* f) const;

};
class defiSlot {
public:
  defiSlot();
  void Init();

  void Destroy();
  ~defiSlot();

  void clear();
  void clearPoly();

  void setLayer(const char* name);
  void addRect(int xl, int yl, int xh, int yh);
  void addPolygon(defiGeometries* geom);

  int hasLayer() const;
  const char* layerName() const;

  int numRectangles() const;
  int xl(int index) const;
  int yl(int index) const;
  int xh(int index) const;
  int yh(int index) const;

  int numPolygons() const;                        // 5.6
  struct defiPoints getPolygon(int index) const;  // 5.6

  void print(FILE* f) const;

};
class defiTimingDisable {
public:
  defiTimingDisable();
  void Init();

  void Destroy();
  ~defiTimingDisable();

  void clear();

  void setFromTo(const char* fromInst, const char* fromPin,
		 const char* toInst, const char* toPin);
  void setThru(const char* fromInst, const char* fromPin);
  void setMacro(const char* name);
  void setMacroThru(const char* thru);
  void setMacroFromTo(const char* fromPin, const char* toPin);
  void setReentrantPathsFlag();

  int hasMacroThru() const;
  int hasMacroFromTo() const;
  int hasThru() const;
  int hasFromTo() const;
  int hasReentrantPathsFlag() const;

  const char* fromPin() const;
  const char* toPin() const;
  const char* fromInst() const;
  const char* toInst() const;
  const char* macroName() const;
  const char* thruPin() const;    // Also macro thru
  const char* thruInst() const;

  // debug print
  void print(FILE* f) const;

};
class defiVia {
public:
  defiVia();
  void Init();

  void clear();
  void Destroy();
  ~defiVia();

  void setup(const char* name);
  void addPattern(const char* patt);
  void addLayer(const char* layer, int xl, int yl, int xh, int yh);
  // 5.6
  void addPolygon(const char* layer, defiGeometries* geom);
  void addViaRule(char* viaRuleName, int xSize, int ySize, char* botLayer,
                  char* cutLayer, char* topLayer, int xSpacing, int ySpacing,
                  int xBotEnc, int yBotEnc, int xTopEnc, int yTopEnc);
  void addRowCol(int numCutRows, int numCutCols);
  void addOrigin(int xOffset, int yOffset);
  void addOffset(int xBotOs, int yBotOs, int xTopOs, int yTopOs);
  void addCutPattern(char* cutPattern);

  const char* name() const;
  const char* pattern() const;
  int hasPattern() const;
  int numLayers() const;
  void layer(int index, char** L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT) const;
  int numPolygons() const;                        // 5.6
  const char* polygonName(int index) const;       // 5.6
  struct defiPoints getPolygon(int index) const;  // 5.6
  int hasViaRule() const;
  void viaRule(char** L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT, char** L_OUTPUT,
               char** L_OUTPUT, char** L_OUTPUT, int* L_OUTPUT,
               int* L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT,
               int* L_OUTPUT) const;
  int hasRowCol() const;
  void rowCol(int* L_OUTPUT, int* L_OUTPUT) const;
  int hasOrigin() const;
  void origin(int* L_OUTPUT, int* L_OUTPUT) const;
  int hasOffset() const;
  void offset(int* L_OUTPUT, int* L_OUTPUT, int* L_OUTPUT,
              int* L_OUTPUT) const;
  int hasCutPattern() const;
  const char* cutPattern() const;

  void print(FILE* f) const;

};
class defrReader {
public:
    int defrInit();
    int defrReset();
    int defrRead(FILE* f, const char* fName, defiUserData uData, int case_sensitive);
    void defrInitGlobals();
    void defrSetRegisterUnusedCallbacks();
    void defrSetUnusedCallbacks(defrVoidCbkFnType f);
    void defrUnsetCallbacks();
    void defrPrintUnusedCallbacks(FILE* log);
    int defrReleaseNResetMemory();

    // Control def parser output warning & info messages
    void defrDisableParserMsgs(int nMsg, int* L_OUTPUT);
    void defrEnableParserMsgs(int nMsg, int* L_OUTPUT);
    void defrEnableAllMsgs();

    static defrReader *get();
    
    // Set Callback functions
    void setUserData(defiUserData d);
    defiUserData getUserData();
    void setDesignCbk(defrStringCbkFnType f);
    void setTechnologyCbk(defrStringCbkFnType f);
    void setDesignEndCbk(defrVoidCbkFnType f);
    void setPropCbk(defrPropCbkFnType f);
    void setPropDefEndCbk(defrVoidCbkFnType f);
    void setPropDefStartCbk(defrVoidCbkFnType f);
    void setArrayNameCbk(defrStringCbkFnType f);
    void setFloorPlanNameCbk(defrStringCbkFnType f);
    void setUnitsCbk(defrDoubleCbkFnType f);
    void setVersionCbk(defrDoubleCbkFnType f);
    void setVersionStrCbk(defrStringCbkFnType f);
    void setDividerCbk(defrStringCbkFnType f);
    void setBusBitCbk(defrStringCbkFnType f);
    void setSiteCbk(defrSiteCbkFnType f);
    void setCanplaceCbk(defrSiteCbkFnType f);
    void setCannotOccupyCbk(defrSiteCbkFnType f);
    void setComponentStartCbk(defrIntegerCbkFnType f);
    void setComponentEndCbk(defrVoidCbkFnType f);
    void setComponentCbk(defrComponentCbkFnType f);
    void setNetStartCbk(defrIntegerCbkFnType f);
    void setNetEndCbk(defrVoidCbkFnType f);
    void setNetCbk(defrNetCbkFnType f);
    void setNetNameCbk(defrStringCbkFnType f);
    void setNetSubnetNameCbk(defrStringCbkFnType f);
    void setNetNonDefaultRuleCbk(defrStringCbkFnType f);
    void setNetPartialPathCbk(defrNetCbkFnType f);
    void setSNetStartCbk(defrIntegerCbkFnType f);
    void setSNetEndCbk(defrVoidCbkFnType f);
    void setSNetCbk(defrNetCbkFnType f);
    void setSNetPartialPathCbk(defrNetCbkFnType f);
    void setSNetWireCbk(defrNetCbkFnType f);
    void setPathCbk(defrPathCbkFnType f);
    void setAddPathToNet();
    void setAllowComponentNets();
    void setComponentExtCbk(defrStringCbkFnType f);
    void setPinExtCbk(defrStringCbkFnType f);
    void setViaExtCbk(defrStringCbkFnType f);
    void setNetConnectionExtCbk(defrStringCbkFnType f);
    void setNetExtCbk(defrStringCbkFnType f);
    void setGroupExtCbk(defrStringCbkFnType f);
    void setScanChainExtCbk(defrStringCbkFnType f);
    void setIoTimingsExtCbk(defrStringCbkFnType f);
    void setPartitionsExtCbk(defrStringCbkFnType f);
    void setHistoryCbk(defrStringCbkFnType f);
    void setDieAreaCbk(defrBoxCbkFnType f);
    void setPinCapCbk(defrPinCapCbkFnType f);
    void setPinEndCbk(defrVoidCbkFnType f);
    void setStartPinsCbk(defrIntegerCbkFnType f);
    void setDefaultCapCbk(defrIntegerCbkFnType f);
    void setPinCbk(defrPinCbkFnType f);
    void setRowCbk(defrRowCbkFnType f);
    void setTrackCbk(defrTrackCbkFnType f);
    void setGcellGridCbk(defrGcellGridCbkFnType f);
    void setViaStartCbk(defrIntegerCbkFnType f);
    void setViaEndCbk(defrVoidCbkFnType f);
    void setViaCbk(defrViaCbkFnType f);
    void setRegionStartCbk(defrIntegerCbkFnType f);
    void setRegionEndCbk(defrVoidCbkFnType f);
    void setRegionCbk(defrRegionCbkFnType f);
    void setGroupsStartCbk(defrIntegerCbkFnType f);
    void setGroupsEndCbk(defrVoidCbkFnType f);
    void setGroupNameCbk(defrStringCbkFnType f);
    void setGroupMemberCbk(defrStringCbkFnType f);
    void setGroupCbk(defrGroupCbkFnType f);
    void setAssertionsStartCbk(defrIntegerCbkFnType f);
    void setAssertionsEndCbk(defrVoidCbkFnType f);
    void setAssertionCbk(defrAssertionCbkFnType f);
    void setConstraintsStartCbk(defrIntegerCbkFnType f);
    void setConstraintsEndCbk(defrVoidCbkFnType f);
    void setConstraintCbk(defrAssertionCbkFnType f);
    void setScanchainsStartCbk(defrIntegerCbkFnType f);
    void setScanchainsEndCbk(defrVoidCbkFnType f);
    void setScanchainCbk(defrScanchainCbkFnType f);
    void setIOTimingsStartCbk(defrIntegerCbkFnType f);
    void setIOTimingsEndCbk(defrVoidCbkFnType f);
    void setIOTimingCbk(defrIOTimingCbkFnType f);
    void setFPCStartCbk(defrIntegerCbkFnType f);
    void setFPCEndCbk(defrVoidCbkFnType f);
    void setFPCCbk(defrFPCCbkFnType f);
    void setTimingDisablesStartCbk(defrIntegerCbkFnType f);
    void setTimingDisablesEndCbk(defrVoidCbkFnType f);
    void setTimingDisableCbk(defrTimingDisableCbkFnType f);
    void setPartitionsStartCbk(defrIntegerCbkFnType f);
    void setPartitionsEndCbk(defrVoidCbkFnType f);
    void setPartitionCbk(defrPartitionCbkFnType f);
    void setPinPropStartCbk(defrIntegerCbkFnType f);
    void setPinPropEndCbk(defrVoidCbkFnType f);
    void setPinPropCbk(defrPinPropCbkFnType f);
    void setCaseSensitiveCbk(defrIntegerCbkFnType f);
    void setBlockageStartCbk(defrIntegerCbkFnType f);
    void setBlockageEndCbk(defrVoidCbkFnType f);
    void setBlockageCbk(defrBlockageCbkFnType f);
    void setSlotStartCbk(defrIntegerCbkFnType f);
    void setSlotEndCbk(defrVoidCbkFnType f);
    void setSlotCbk(defrSlotCbkFnType f);
    void setFillStartCbk(defrIntegerCbkFnType f);
    void setFillEndCbk(defrVoidCbkFnType f);
    void setFillCbk(defrFillCbkFnType f);
    void setNonDefaultStartCbk(defrIntegerCbkFnType f);
    void setNonDefaultEndCbk(defrVoidCbkFnType f);
    void setNonDefaultCbk(defrNonDefaultCbkFnType f);
    void setStylesStartCbk(defrIntegerCbkFnType f);
    void setStylesEndCbk(defrVoidCbkFnType f);
    void setStylesCbk(defrStylesCbkFnType f);
    void setExtensionCbk(defrStringCbkFnType f);

    void setGeomPtr(defiGeometries* p);
    void setSubnet(defiSubnet* p);

    void setAssertionWarnings(int warn);
    void setBlockageWarnings(int warn);
    void setCaseSensitiveWarnings(int warn);
    void setComponentWarnings(int warn);
    void setConstraintWarnings(int warn);
    void setDefaultCapWarnings(int warn);
    void setFillWarnings(int warn);
    void setGcellGridWarnings(int warn);
    void setIOTimingWarnings(int warn);
    void setNetWarnings(int warn);
    void setNonDefaultWarnings(int warn);
    void setPinExtWarnings(int warn);
    void setPinWarnings(int warn);
    void setRegionWarnings(int warn);
    void setRowWarnings(int warn);
    void setTrackWarnings(int warn);
    void setScanchainWarnings(int warn);
    void setSNetWarnings(int warn);
    void setStylesWarnings(int warn);
    void setUnitsWarnings(int warn);
    void setVersionWarnings(int warn);
    void setViaWarnings(int warn);
    
    // Get callback functions
    defrStringCbkFnType getDesignCbk();
    defrStringCbkFnType getTechnologyCbk();
    defrVoidCbkFnType getDesignEndCbk();
    defrPropCbkFnType getPropCbk();
    defrVoidCbkFnType getPropDefEndCbk();
    defrVoidCbkFnType getPropDefStartCbk();
    defrStringCbkFnType getArrayNameCbk();
    defrStringCbkFnType getFloorPlanNameCbk();
    defrDoubleCbkFnType getUnitsCbk();
    defrDoubleCbkFnType getVersionCbk();
    defrStringCbkFnType getVersionStrCbk();
    defrStringCbkFnType getDividerCbk();
    defrStringCbkFnType getBusBitCbk();
    defrSiteCbkFnType getSiteCbk();
    defrSiteCbkFnType getCanplaceCbk();
    defrSiteCbkFnType getCannotOccupyCbk();
    defrIntegerCbkFnType getComponentStartCbk();
    defrVoidCbkFnType getComponentEndCbk();
    defrComponentCbkFnType getComponentCbk();
    defrIntegerCbkFnType getNetStartCbk();
    defrVoidCbkFnType getNetEndCbk();
    defrNetCbkFnType getNetCbk();
    defrStringCbkFnType getNetNameCbk();
    defrStringCbkFnType getNetSubnetNameCbk();
    defrStringCbkFnType getNetNonDefaultRuleCbk();
    defrNetCbkFnType getNetPartialPathCbk();
    defrIntegerCbkFnType getSNetStartCbk();
    defrVoidCbkFnType getSNetEndCbk();
    defrNetCbkFnType getSNetCbk();
    defrNetCbkFnType getSNetPartialPathCbk();
    defrNetCbkFnType getSNetWireCbk();
    defrPathCbkFnType getPathCbk();
    int getAddPathToNet();
    int getAllowComponentNets();
    defrStringCbkFnType getComponentExtCbk();
    defrStringCbkFnType getPinExtCbk();
    defrStringCbkFnType getViaExtCbk();
    defrStringCbkFnType getNetConnectionExtCbk();
    defrStringCbkFnType getNetExtCbk();
    defrStringCbkFnType getGroupExtCbk();
    defrStringCbkFnType getScanChainExtCbk();
    defrStringCbkFnType getIoTimingsExtCbk();
    defrStringCbkFnType getPartitionsExtCbk();
    defrStringCbkFnType getHistoryCbk();
    defrBoxCbkFnType getDieAreaCbk();
    defrPinCapCbkFnType getPinCapCbk();
    defrVoidCbkFnType getPinEndCbk();
    defrIntegerCbkFnType getStartPinsCbk();
    defrIntegerCbkFnType getDefaultCapCbk();
    defrPinCbkFnType getPinCbk();
    defrRowCbkFnType getRowCbk();
    defrTrackCbkFnType getTrackCbk();
    defrGcellGridCbkFnType getGcellGridCbk();
    defrIntegerCbkFnType getViaStartCbk();
    defrVoidCbkFnType getViaEndCbk();
    defrViaCbkFnType getViaCbk();
    defrIntegerCbkFnType getRegionStartCbk();
    defrVoidCbkFnType getRegionEndCbk();
    defrRegionCbkFnType getRegionCbk();
    defrIntegerCbkFnType getGroupsStartCbk();
    defrVoidCbkFnType getGroupsEndCbk();
    defrStringCbkFnType getGroupNameCbk();
    defrStringCbkFnType getGroupMemberCbk();
    defrGroupCbkFnType getGroupCbk();
    defrIntegerCbkFnType getAssertionsStartCbk();
    defrVoidCbkFnType getAssertionsEndCbk();
    defrAssertionCbkFnType getAssertionCbk();
    defrIntegerCbkFnType getConstraintsStartCbk();
    defrVoidCbkFnType getConstraintsEndCbk();
    defrAssertionCbkFnType getConstraintCbk();
    defrIntegerCbkFnType getScanchainsStartCbk();
    defrVoidCbkFnType getScanchainsEndCbk();
    defrScanchainCbkFnType getScanchainCbk();
    defrIntegerCbkFnType getIOTimingsStartCbk();
    defrVoidCbkFnType getIOTimingsEndCbk();
    defrIOTimingCbkFnType getIOTimingCbk();
    defrIntegerCbkFnType getFPCStartCbk();
    defrVoidCbkFnType getFPCEndCbk();
    defrFPCCbkFnType getFPCCbk();
    defrIntegerCbkFnType getTimingDisablesStartCbk();
    defrVoidCbkFnType getTimingDisablesEndCbk();
    defrTimingDisableCbkFnType getTimingDisableCbk();
    defrIntegerCbkFnType getPartitionsStartCbk();
    defrVoidCbkFnType getPartitionsEndCbk();
    defrPartitionCbkFnType getPartitionCbk();
    defrIntegerCbkFnType getPinPropStartCbk();
    defrVoidCbkFnType getPinPropEndCbk();
    defrPinPropCbkFnType getPinPropCbk();
    defrIntegerCbkFnType getCaseSensitiveCbk();
    defrIntegerCbkFnType getBlockageStartCbk();
    defrVoidCbkFnType getBlockageEndCbk();
    defrBlockageCbkFnType getBlockageCbk();
    defrIntegerCbkFnType getSlotStartCbk();
    defrVoidCbkFnType getSlotEndCbk();
    defrSlotCbkFnType getSlotCbk();
    defrIntegerCbkFnType getFillStartCbk();
    defrVoidCbkFnType getFillEndCbk();
    defrFillCbkFnType getFillCbk();
    defrIntegerCbkFnType getNonDefaultStartCbk();
    defrVoidCbkFnType getNonDefaultEndCbk();
    defrNonDefaultCbkFnType getNonDefaultCbk();
    defrIntegerCbkFnType getStylesStartCbk();
    defrVoidCbkFnType getStylesEndCbk();
    defrStylesCbkFnType getStylesCbk();
    defrStringCbkFnType getExtensionCbk();


    defiSubnet* getSubnet();
    defiPath* getPath();
    defiProp& getProp();
    defiSite& getSite();
    defiComponent& getComponent();
    defiNet& getNet();
    defiPinCap& getPinCap();
    defiSite& getCannotOccupy();
    defiSite& getCanplace();
    defiBox& getDieArea();
    defiPin& getPin();
    defiRow& getRow();
    defiTrack& getTrack();
    defiGcellGrid& getGcellGrid();
    defiVia& getVia();
    defiRegion& getRegion();
    defiGroup& getGroup();
    defiAssertion& getAssertion();
    defiScanchain& getScanchain();
    defiIOTiming& getIOTiming();
    defiFPC& getFPC();
    defiTimingDisable& getTimingDisable();
    defiPartition& getPartition();
    defiPinProp& getPinProp();
    defiBlockage& getBlockage();
    defiSlot& getSlot();
    defiFill& getFill();
    defiNonDefault& getNonDefault();
    defiStyles& getStyles();
    defiGeometries* getGeomPtr();
    defiPropType& getCompProp();
    defiPropType& getCompPinProp();
    defiPropType& getDesignProp();
    defiPropType& getGroupProp();
    defiPropType& getNDefProp();
    defiPropType& getNetProp();
    defiPropType& getPinDefProp();
    defiPropType& getRegionProp();
    defiPropType& getRowProp();
    defiPropType& getSNetProp();

    int getAssertionWarnings();
    int getBlockageWarnings();
    int getCaseSensitiveWarnings();
    int getComponentWarnings();
    int getConstraintWarnings();
    int getDefaultCapWarnings();
    int getFillWarnings();
    int getGcellGridWarnings();
    int getIOTimingWarnings();
    int getNetWarnings();
    int getNonDefaultWarnings();
    int getPinExtWarnings();
    int getPinWarnings();
    int getRegionWarnings();
    int getRowWarnings();
    int getTrackWarnings();
    int getScanchainWarnings();
    int getSNetWarnings();
    int getStylesWarnings();
    int getUnitsWarnings();
    int getVersionWarnings();
    int getViaWarnings();

    FILE* getFile();
    const char* getFileName();
    int addPathToNet();
    int needPathData();
    int isReset();
    int isDoneDesign();
    void setDoneDesign(int d);
    void pathIsDone(int shield, int reset, int netOsnet, int* L_OUTPUT);
    void incrUnusedCallbacks(int i);
    int* L_OUTPUT();

};
